package com.dfy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dfy.entity.SpotFacility;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;

@Mapper
public interface SpotFacilityMapper extends BaseMapper<SpotFacility> {
    @Delete("DELETE FROM spot_facilities WHERE spot_id = #{spotId}")
    int deleteBySpotId(Long spotId);

    @Select("SELECT * FROM spot_facilities WHERE spot_id = #{spotId}")
    List<SpotFacility> selectBySpotId(Long spotId);
} 